package ooday05;

import com.sun.xml.internal.bind.util.Which;

public class EnumDemo {
    public static void main(String[] args) {
        Season[] s = Season.values();
        for (int i = 0; i < s.length; i++) {
            System.out.println(s);
            System.out.println(s[i].getSeasonName());
            System.out.println(s[i].getSeasonDesc());
        }

        Season season = Season.WINTER;
        switch (season) {
            case SPRING:
                System.out.println("天气" + season.getSeasonDesc() + "去放风筝咯！");
                break;
            case SUMMER:
                System.out.println("天气" + season.getSeasonDesc() + "去游泳咯！");
                break;
            case AUTUMN:
                System.out.println("天气" + season.getSeasonDesc() + "去摘苹果咯！");
                break;
            case WINTER:
                System.out.println("天气" + season.getSeasonDesc() + "去堆雪人咯！");
                break;
        }
//        Season s = Season.AUTUMN;
//        System.out.println(s);
//        System.out.println(s.getSeasonName());
//        System.out.println(s.getSeasonDesc());
    }
}
